POST: http://www.nomedoseusite.com.br/api_products_others.php?action=edit_suppliers
Header Parameter | Format |
Usuario1 | base64_encode() |
Senha1 | base64_encode() |
Parameter | Format | Description |
suppliers_id | JSON | ID of suppliers Format: int(11) * FIELD REQUIRED |
suppliers_group_name | JSON |
Main name of suppliers |
suppliers_description | JSON | Description of suppliers Format: text * FIELD REQUIRED |
PHP Sample
// sample edit suppliers $url = $domain_url . '/api_products_others.php?action=edit_suppliers'; $data = array("suppliers_id" => "ID of suppliers", // ID of suppliers * FIELD REQUIRED "suppliers_group_name" => "Main name of suppliers", // Main name of suppliers * FIELD REQUIRED "suppliers_description" => "Description of suppliers" // Description of suppliers * FIELD REQUIRED ); $data_string = json_encode($data); $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', "Cache-Control: no-cache", 'Usuario1: ' . base64_encode($usuario1), 'Senha1: ' . base64_encode($senha1), 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); curl_close($ch); print_r($result); // sample edit suppliers eof
Return Error:
code
message
Return Success:
code
id
message